package com.dxy.gateway.service;

import com.dxy.common.vo.Result;
import com.dxy.gateway.provider.AuthServiceProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PermissionServiceImpl implements PermissionService {

    @Autowired
    private AuthServiceProvider authServiceProvider;

    @Override
    public boolean checkPermission(String token, String url) {
        Result<Boolean> result = authServiceProvider.checkPermission(token, url);
        return result.isSuccess() && result.getData();
    }
}
